package com.example.librarymanagement.dto.role;

import com.example.librarymanagement.entity.Role;
import com.example.librarymanagement.util.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @author fgba
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class RoleDto extends BaseDto<Role> {

    private Integer id;

    @NotBlank(message = "角色名为空")
    @ApiModelProperty("角色名")
    private String name;

    @NotBlank(message = "角色代码为空")
    @ApiModelProperty("角色代码")
    private String code;


    @ApiModelProperty("备注")
    private String remark;


    private LocalDateTime created;

    private LocalDateTime updated;

    @NotNull(message = "状态值为空")
    private Integer state;

}
